package br.xraylol.test.client;

import static org.junit.Assert.assertNotNull;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import br.xraylol.bean.riot.ChampionBean;
import br.xraylol.bean.riot.ItemBean;
import br.xraylol.bean.riot.MasteryBean;
import br.xraylol.bean.riot.RealmBean;
import br.xraylol.bean.riot.RuneBean;
import br.xraylol.bean.riot.SummonerSpellBean;
import br.xraylol.client.LolStaticDataClient;
import br.xraylol.custom.list.ChampionList;
import br.xraylol.custom.list.ItemList;
import br.xraylol.custom.list.MasteryList;
import br.xraylol.custom.list.RuneList;
import br.xraylol.custom.list.SummonerSpellList;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring-module.xml")
public class LolStaticDataTestClient {
	
	@Autowired
	LolStaticDataClient client;
	
	@Test
	public void findChampions() {
		ChampionList champions = client.findChampions();
		
		assertNotNull(champions);
	}
	
	@Test
	public void findChampionById() {
		ChampionBean champion = client.findChampionById(266L);
		
		assertNotNull(champion);
	}
	
	@Test
	public void findItems() {
		ItemList items = client.findItems();
		
		assertNotNull(items);
	}
	
	@Test
	public void findItemById() {
		ItemBean item = client.findItemById(3301L);
		
		assertNotNull(item);
	}
	
	@Test
	public void findMasteries() {
		MasteryList masteries = client.findMasteries();
		
		assertNotNull(masteries);
	}
	
	@Test
	public void findMasteryById() {
		MasteryBean mastery = client.findMasteryById(4353L);
		
		assertNotNull(mastery);
	}
	
	@Test
	public void findRealm() {
		RealmBean realm = client.findRealm();
		
		assertNotNull(realm);
	}
	
	@Test
	public void findRunes() {
		RuneList runes = client.findRunes();
		
		assertNotNull(runes);
	}
	
	@Test
	public void findRuneById() {
		RuneBean rune = client.findRuneById(5235L);
		
		assertNotNull(rune);
	}
	
	@Test
	public void findSummonersSpell() {
		SummonerSpellList summonersSpell = client.findSummonersSpell();
		
		assertNotNull(summonersSpell);
	}
	
	@Test
	public void findSummonerSpellById() {
		SummonerSpellBean summonerSpell = client.findSummonerSpellById(12L);;
	
		assertNotNull(summonerSpell);
	}
}
